# coding=utf-8

import requests

"""
https://github.com/jhao104/proxy_pool
"""


def get_ip():
    proxy = requests.get("http://192.168.25.160:5010/get/").json()
    if "proxy" in proxy:
        return proxy.get("proxy")
    else:
        return get_ip()


def delete_proxy(proxy):
    requests.get("http://192.168.25.160:5010/delete/?proxy={}".format(proxy))
